package com.yunchang.springboot.mapper.mwsfinance;

import com.yunchang.springboot.models.mwsfinance.FGoodsInTransit;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface FGoodsInTransitMapper {
    int deleteByPrimaryKey(Long id);

    int insert(FGoodsInTransit record);

    int insertSelective(FGoodsInTransit record);

    FGoodsInTransit selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(FGoodsInTransit record);

    int updateByPrimaryKey(FGoodsInTransit record);

    /**
     * 根据createTime获取对应的数据
     * @param time
     * @return
     */
    List<FGoodsInTransit> selectByCreateTime(String time);

    /**
     * 根据时间和是否生成出入库明细数据获取对应的数据
     * @param postedDate
     * @param isInventoryDetails
     * @return
     */
    List<FGoodsInTransit> selectByPostedDateAndIsInventoryDetails(@Param("postedDate") String postedDate,@Param("isInventoryDetails") Integer isInventoryDetails);

    /**
     *  根据fGoodsInTransitList对象集合更新是否生成财务数据的状态
     * @param fGoodsInTransitList
     * @return
     */
    int updateIsInventoryDetailsByFGoodsInTransitList(@Param("fGoodsInTransitList") List<FGoodsInTransit> fGoodsInTransitList);

}